from application.config import YAML_CONTENT


# 获取图片上传配置
IMAGE_UPLOAD_CONFIG: dict = YAML_CONTENT.get("ImageUploadConfig")


class ImageBedConfig:
    IMAGE_BED_CONFIG: dict = IMAGE_UPLOAD_CONFIG.get("ImageBed")
    use: bool = IMAGE_BED_CONFIG.get("use", False)
    email: str = IMAGE_BED_CONFIG.get("email")
    password: str = IMAGE_BED_CONFIG.get("password")


class UpyunConfig:
    BASE_CONFIG: dict = IMAGE_UPLOAD_CONFIG.get("Upyun")
    use: bool = BASE_CONFIG.get("use", False)
    domain: str = BASE_CONFIG.get("domain")
    service: str = BASE_CONFIG.get("service")
    username: str = BASE_CONFIG.get("username")
    password: str = BASE_CONFIG.get("password")
